package cn.stylefeng.guns.sys.config;

import cn.stylefeng.roses.file.modular.aliyun.AliyunFileOperator;
import cn.stylefeng.roses.file.modular.aliyun.prop.AliyunOssProperties;
import lombok.Data;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author Aria
 */
@Configuration
public class OssConfig {

    /**
     * 阿里云的文件上传配置
     *
     * @author fengshuonan
     * @date 2021/2/22 10:10
     */
    @Bean
    public AliyunFileOperator fileOperator() {

        AliyunOssProperties aliyunOssProperties = new AliyunOssProperties();

        aliyunOssProperties.setAccessKeyId("LTAI4GFBVU7Qi7xVZsHfRCBQ");
        aliyunOssProperties.setAccessKeySecret("Y7vNMEo95JufoOKQCZIhl0DqGIblGr");

        return new AliyunFileOperator(aliyunOssProperties);
    }
}
